home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 2 #2 / Commodore_Disk_User_Vol.2_2_1989_-_Side_B.d64 / border sprites (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  4KB  |  103 lines

  1. 10 ifpeek(49152)+peek(49156)<>103then2000
  2. 20 poke53269,0:poke53277,255:poke53271,0:fori=0to3:poke53287+i,4
  3. 30 poke2040+i,248+i:next:fori=4to7:poke53287+i,11:poke2040+i,252:next
  4. 40 fori=0to3:sys49155,i,152+i*48,12:sys49155,i+4,152+i*48,12:next:poke2,1
  5. 50 poke53280,5:poke53281,0:sys49152
  6. 60 print"[147][155]   [194][207][210][196][197][210] [211][208][210][201][212][197][211] and [211][208][210][201][212][197] [204][207][195][193][212][197][210]"
  7. 70 print"   [215]ritten by [202].[198]inch     [211]ept. 1988"
  8. 80 print"[150]     ![204]et your sprites break free!"
  9. 90 print"[159] [212]he  machine code  routines will allow"
  10. 100 print" you to place sprites in  the upper and"
  11. 110 print" and lower  borders  as  well  as being"
  12. 120 print" able to  position sprites  without [217][207][213]"
  13. 130 print" having to change the appropriate  bits"
  14. 140 print" in the [205][211][194] register.    [212]o utilise the"
  15. 150 print" routines  first set the variable [154][195][210][159] to"
  16. 160 print" the  start address  of  the code which"
  17. 170 print" resides  between [154]49152[159] and [154]49467[159] incl."
  18. 180 gosub1000
  19. 190 print"[147][155]   [194][207][210][196][197][210] [211][208][210][201][212][197][211] and [211][208][210][201][212][197] [204][207][195][193][212][197][210]"
  20. 200 print"   [215]ritten by [202].[198]inch     [211]ept. 1988"
  21. 210 print"[150]     ![204]et your sprites break free!"
  22. 220 print"[154] [211][217][211] [195][210] [159]will activate the code allowing"
  23. 230 print" you to give your  sprites any [217]-coord."
  24. 240 print" between  [154]0  [159]and  [154]255[159].  [193]  message will"
  25. 250 print" appear  to  indicate  that  it  is now"
  26. 260 print" active.  [217]ou can disable  this message"
  27. 270 print" with a [154][208][207][203][197] 2,1[159]. [210]emember: [201]t is  only"
  28. 280 print" the  upper and lower  borders that are"
  29. 290 print" accessible with this routine."
  30. 300 gosub1000
  31. 310 print"[147][155]   [194][207][210][196][197][210] [211][208][210][201][212][197][211] and [211][208][210][201][212][197] [204][207][195][193][212][197][210]"
  32. 320 print"   [215]ritten by [202].[198]inch     [211]ept. 1988"
  33. 330 print"[150]     ![204]et your sprites break free!"
  34. 340 print"[154] [211][217][211] [195][210]+3,sn,x,y  [159]will  enable  you  to"
  35. 350 print" position  sprite [160][154]sn[159]  at a location on"
  36. 360 print" the screen specified by [154]x[159] and [154]y[159].  [212]his"
  37. 370 print" will  automatically  set or clear  the"
  38. 380 print" appropriate bits in the  [205][211][194] register."
  39. 390 print"[154] "chr$(34)"sn"chr$(34)"[159] should  be  between  0 and 7, [154]"chr$(34);
  40. 400 print"x"chr$(34):print"[159] between 0 and 360, and [154]"chr$(34)"y"chr$(34);
  41. 410 print"[159] should be a  value between 0 and 255.":gosub1000
  42. 420 print"[147][155]   [194][207][210][196][197][210] [211][208][210][201][212][197][211] and [211][208][210][201][212][197] [204][207][195][193][212][197][210]"
  43. 430 print"   [215]ritten by [202].[198]inch     [211]ept. 1988"
  44. 440 print"[150]     ![204]et your sprites break free!"
  45. 450 print"[159]     [196]o you wish to relocate code?"
  46. 460 print"[154]          [208]lease press [217] or [206]"
  47. 470 geta$:ifa$="n"thens=49152:goto570
  48. 480 ifa$<>"y"then470
  49. 490 print"[159] [197]nter start address:";:open1,0:input#1,a$:close1
  50. 500 s=val(a$):if(s<0)or(s>65535)or(s>48800ands<49511)thenprint"[145][145][145]":goto490
  51. 510 sa=s:print:print"[145][159]        [210]elocating code at[154]"sa
  52. 520 fori=0to315:pokesa+i,peek(49152+i):next
  53. 530 fori=1to9:readpl,ex:e=sa+ex:el=e-(256*int(e/256)):eh=int(e/256)
  54. 540 pokesa+pl,el:pokesa+pl+1,eh:next
  55. 550 data1,89,4,27,28,9,42,35,47,9,65,82,83,9,111,124,122,169
  56. 560 e=sa+223:pokesa+178,e-(256*int(e/256)):pokesa+180,int(e/256)
  57. 570 print"[147][155]   [194][207][210][196][197][210] [211][208][210][201][212][197][211] and [211][208][210][201][212][197] [204][207][195][193][212][197][210]"
  58. 580 print"   [215]ritten by [202].[198]inch     [211]ept. 1988"
  59. 590 print"[150]     ![204]et your sprites break free!"
  60. 600 print" [201]mportant information:"
  61. 610 print"[159] [195]ode lies between[154]"s"[159]&[154]"s+315"[159]incl."
  62. 620 print"[154] [195][210][159] should be set to[154]"s"[157][159]."
  63. 630 print"[159] [210]outine has been initiated."
  64. 640 print" [201]f you  wish to save  the code,  press"
  65. 650 print"[154] [210][213][206]/[211][212][207][208][159]  and  [154][210][197][211][212][207][210][197][159] and then  type:"
  66. 660 print"[154] [210][213][206] 5000"
  67. 670 a$="[145][210][197][193][196][217]":fori=1to6:poke630+i,asc(mid$(a$,i,1)):next:poke637,141:poke198,7
  68. 680 end
  69. 1000 c=1:a=0:poke53269,255
  70. 1010 a=a+1:ifa=20thenforj=0to3:poke53291+j,c:next:c=12-c:a=0
  71. 1020 geta$:ifa$<>chr$(13)then1010
  72. 1030 poke53269,0:return
  73. 2000 poke52,62:poke56,62:clr:poke56334,peek(56334)and254:poke1,peek(1)and251
  74. 2010 a$="press[160]return":x=0:fori=0to11:sn=248+int(i/3)
  75. 2020 sa=sn*64+x:a=asc(mid$(a$,i+1,1))-64+128:forj=1to8
  76. 2030 pokesa+j*3,peek(53247+a*8+j):next:forj=9to20:pokesa+j*3,0:next
  77. 2040 pokesa,255:x=x+1:ifx=3thenx=0
  78. 2050 next
  79. 2060 poke1,peek(1)or4:poke56334,peek(56334)or1
  80. 2070 fori=0to63:a=0:ifi<27thena=255
  81. 2080 poke16128+i,a:next
  82. 2090 load"mcode",8,1
  83. 5000 x=peek(53280)and15:y=peek(53281)and15:ifx=14andy=6then5030
  84. 5010 print"before saving code, interrupts must be  disabled - restore the screen"
  85. 5020 end
  86. 5030 poke53280,5:poke53281,0
  87. 5040 print"[147][155]   [194][207][210][196][197][210] [211][208][210][201][212][197][211] and [211][208][210][201][212][197] [204][207][195][193][212][197][210]"
  88. 5050 print"   [215]ritten by [202].[198]inch     [211]ept. 1988"
  89. 5060 print"[150]     ![204]et your sprites break free!"
  90. 5070 print," [205][193][195][200][201][206][197] [195][207][196][197] [211][193][214][197][210]"
  91. 5080 print,"[159][211]ave to [154][196][146]isk [159]or [154][212][146]ape":dv=8:d$="[196][201][211][203]"
  92. 5090 geta$:ifa$="t"thendv=1:d$="[212][193][208][197]":goto5110
  93. 5100 ifa$<>"d"then5090
  94. 5110 print,"[145]   [159][211]aving to [154]"d$"   "
  95. 5120 print"[159] [197]nter start address:[154] ";:open1,0:input#1,a$:close1
  96. 5130 a=val(a$):if(a<0ora>65535)thenprint"[145][145][145][145]":goto5120
  97. 5140 print:s=a:e=s+315:print"[145] [159][211]tart address:[154]"s"[157]       "
  98. 5150 print"[159] [197]nd address:  [154]"e:a$="bord.spr."+str$(s)
  99. 5160 sys49468 a$,dv,2,s,e+1
  100. 5170 print"[147][154][142]code saved ok";:poke53280,14:poke53281,6:end
  101. 5160 sys49468 a$,dv,2,s,e+1
  102. 5170 print"[147][142][154]code saved ok";:poke53280,14:poke53281,6:end
  103.